package home.bean;

// 商品类
import java.io.Serializable;

public class Goods implements Serializable {
    private static final long serialVersionUID = 1L;
    private int goodsId;
    private String goodsName;
    private String goodsIntro;
    private String goodsCoverImg;
    private int sellingPrice;
    private String tag;

    // 构造方法
    public Goods() {}

    public Goods(int goodsId, String goodsName, String goodsIntro,
                 String goodsCoverImg, int sellingPrice, String tag) {
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.goodsIntro = goodsIntro;
        this.goodsCoverImg = goodsCoverImg;
        this.sellingPrice = sellingPrice;
        this.tag = tag;
    }

    // Getter 和 Setter
    public int getGoodsId() { return goodsId; }
    public void setGoodsId(int goodsId) { this.goodsId = goodsId; }

    public String getGoodsName() { return goodsName; }
    public void setGoodsName(String goodsName) { this.goodsName = goodsName; }

    public String getGoodsIntro() { return goodsIntro; }
    public void setGoodsIntro(String goodsIntro) { this.goodsIntro = goodsIntro; }

    public String getGoodsCoverImg() { return goodsCoverImg; }
    public void setGoodsCoverImg(String goodsCoverImg) { this.goodsCoverImg = goodsCoverImg; }

    public int getSellingPrice() { return sellingPrice; }
    public void setSellingPrice(int sellingPrice) { this.sellingPrice = sellingPrice; }

    public String getTag() { return tag; }
    public void setTag(String tag) { this.tag = tag; }

    // 重写 toString 方便调试
    @Override
    public String toString() {
        return "Goods{" +
                "goodsId=" + goodsId +
                ", goodsName='" + goodsName + '\'' +
                ", goodsIntro='" + goodsIntro + '\'' +
                ", goodsCoverImg='" + goodsCoverImg + '\'' +
                ", sellingPrice=" + sellingPrice +
                ", tag='" + tag + '\'' +
                '}';
    }
}